package design_pattern;

/**
 * @ClassName TestSeason2
 * @Deacription TODO
 * @Author 谢忠辉
 * @Date 2021/3/18 0018 17:10
 **/
public class TestSeason2 {
    public static void main( String []args){
        //EnumClass enumClass = new EnumClass();
        EnumClass enumClass = EnumClass.AUTUMN ;
        System.out.println(enumClass);
        System.out.println(enumClass.name());
        EnumClass[] enumClasses = EnumClass.values();
        for (int i = 0; i < EnumClass.values().length; i++) {
            System.out.println(enumClasses[i]);
        }
        System.out.println("!!!!!!!!!!!!!!!!!");
        enumClass = EnumClass.valueOf("SPRING") ;   //获取一个实例
        System.out.println(enumClass);
        enumClass = EnumClass.valueOf(EnumClass.class , "SUMMER");
        System.out.println(enumClass);
    }
}
